import { Inject, Controller, Post } from '@midwayjs/decorator';
import { Context } from '@midwayjs/koa';

// import { Validate } from '@midwayjs/validate';
// import { StudentsinfoDTO } from '../dto/studentsinfo';
import { StudentService } from '../service/student.service';

@Controller('/api')
export class APIController {
  @Inject()
  ctx: Context;

  @Inject()
  studentservice: StudentService
  
  // @Get('/get_user')
  // async getUser(@Query('uid') uid) {

  //   return  await this.userService.getUser({ uid });
  // }


  @Post('/addstudentsinfo' , { summary:"添加学生作品" })
  // @Validate()
  // next
  // async getnovelitem(@Body() data: StudentsinfoDTO) {
  async getnovelitem() {
    // console.log('darta', data);

    return this.studentservice.addinfo()
  }

}
